#!/bin/bash

/usr/local/bin/ffmpeg -y -i recording.raw -ar 16000 recording.flac

/usr/local/bin/wget --post-file='recording.flac' --user-agent='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7' --header='Content-Type: audio/x-flac; rate=16000;' -O 'recognized.json' 'https://www.google.com/speech-api/v1/recognize?client=chromium&lang=en-US&maxresults=1'
